package com.botarena.server.model;

import java.util.ArrayList;
import java.util.List;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import com.botarena.shared.BattleTurn;

@PersistenceCapable
public class BattleProcess extends Entity {
	
	@Persistent(serialized = "true")
	private List<BattleTurn> moves;

	public BattleProcess() {
		this.moves = new ArrayList<BattleTurn>();
	}
	
	public BattleProcess(List<BattleTurn> moves) {
		this.moves = moves;
	}
	
	public List<BattleTurn> getMoves() {
		return moves;
	}

	public void addMove(int field) {
		BattleTurn turn = new BattleTurn(field);
		addMove(turn);
	}
	
	public void addMove(BattleTurn turn) {
		this.moves.add(turn);
	}

	public void setMoves(List<BattleTurn> moves) {
		this.moves = moves;
	}
}
